

from info import create_app, db, models

from flask_script import Manager

from flask_migrate import Migrate, MigrateCommand
# # 设置密钥
# app.config['SECRET_KEY'] = 'DKADSFOIWNEFNDdsafnids298dnadkjljo'
# app.config['SESSION_TYPE'] = 'redis'
# app.config['SESSION_REDIS'] = StrictRedis(host="127.0.0.1", port=6379)
# app.config['SESSION_USE_SIGNER'] = True
# app.config['PERMANENT_SESSION_LIFETIME'] = 60 * 60 * 24
#
# # 配置mysql的链接
# SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql/localhost/info_py33'
# # 关闭警告信息
# SQLALCHEMY_TRACK_MODIFICATION = False

app = create_app('development')
manage = Manager(app)
# 使用迁移框架
Migrate(app, db)
# 添加迁移命令
manage.add_command('db', MigrateCommand)

if __name__ == '__main__':
    print(app.url_map)
    # app.run()
    manage.run()